//
// Created by shen on 8/9/2024.
//

#ifndef TSAVPLAYER_PLAYERWRAPPER_H
#define TSAVPLAYER_PLAYERWRAPPER_H

static const int FFMEDIA_PLAYER = 0;
static const int HWCODEC_PLAYER = 1;
#include <jni.h>
#include "BasePlayer.h"

class PlayerWrapper {
public:
    PlayerWrapper(){

    };
    ~PlayerWrapper();

    void Init(JNIEnv *jniEnv, jobject obj,  char *url, int playerType, int renderType, jobject surface);

    void UnInit();


    void Play();

    void Stop();

protected:
    BasePlayer *mBasePlayer;
};


#endif //TSAVPLAYER_PLAYERWRAPPER_H
